import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)

// 动态导入 Pinia
async function initApp() {
  try {
    const { createPinia } = await import('pinia')
    const pinia = createPinia()
    app.use(pinia)
    app.mount('#app')
  } catch (error) {
    console.error('Failed to load Pinia:', error)
    app.mount('#app')
  }
}

initApp()
